<?php
$login_user = $this->muser->getLogin();
$name = ($this->muser->checkLogin()) ? $login_user['use_account'] : '';
?>
<div class="login-area">
  <div class="login-box logged-in">
	<ul>
	  <li id="display-profile"> <a href="#" title="<?php echo $name;?>">
		<?php 
		echo '<img class="avatar" src="'.image_thumbnail($login_user['use_avatar'],'user-avatar-small').'" alt="'.$name.' Avatar"> ';
		?>
		
		<span class="username">Chào <?php echo $name ?> ▼</span> </a> </li>
	</ul>
  </div>
	<div style="left: 91px; display: none;" id="player-options" class="toolbox"> 
	<a href="<?php echo user_url('index'); ?>" class="avatar"> <img src="<?php echo image_thumbnail($login_user['use_avatar'],'user-avatar-medium'); ?>" height="40" width="40"> </a> 
	<ul>
		<li><a href="<?php echo user_url('index'); ?>">Thông tin tài khoản</a></li>
		<?php /*
		<li><a href="<?php echo user_url('challenge'); ?>">Thách đấu</a></li>
		<li><a href="<?php echo user_url('arena'); ?>">Đấu trường</a></li>
		<li><a href="<?php echo user_url('mail'); ?>">Hộp thư</a></li>
		*/?>
		
		<li><a href="<?php echo user_url('favorites'); ?>">Game yêu thích</a></li>
		
		<li><a href="<?php echo user_url('logout'); ?>">Đăng xuất</a></li>
	</ul>
	</div>
</div>
<script type="text/javascript">
	$(function (){
		$('#display-profile').click(function(){
			var player = $('#player-options');
			if(player.css('display') != 'block') {
				player.slideDown();	
			}else {
				player.slideUp();
			}
			return false;
		});
	});
</script>